package sk.tramtatiri.core;

public enum Values {
	KILOGRAM, GRAM, NOVALUE, LITER, DEKAGRAM, MILILITER, DECILITER;

    public static Values toValue(String val) {
        if (val.equals("g")) {
            return GRAM;
        } else if (val.equals("dg")) {
            return DEKAGRAM;
        } else if (val.equals("kg")) {
            return KILOGRAM;
        } else if (val.equals("l")) {
            return LITER;
        } else if (val.equals("ml")) {
            return MILILITER;
        } else if (val.equals("dl")) {
            return DECILITER;
        } else {
            return NOVALUE;
        }
    }
}
